package com.situ.javase.day7;

public abstract class AbstractCal{
	protected int num1;
	protected int num2;

	public AbstractCal() {
		super();// New Object()
	}

	public AbstractCal(int num1, int num2) {
		super();
		this.num1 = num1;
		this.num2 = num2;
	}

//	public int getResult() {
//		System.out.println("Cal.getResult()");
//		return 0;
//	}
	
	// 抽象方法,在父类里面定义一个标准：所有的子类都要实现
	// getResult这个方法实现对应的加减乘除运算
	public abstract int getResult();

	public int getNum1() {
		return num1;
	}

	public void setNum1(int num1) {
		this.num1 = num1;
	}

	public int getNum2() {
		return num2;
	}

	public void setNum2(int num2) {
		this.num2 = num2;
	}

}
